A Generative Approach to Traversal-based Generic Programming
نویسندگان
چکیده
The development of complex software requires the implementation of functions over a variety of recursively defined data structures. Much of the corresponding code is not necessarily difficult, but more tedious and/or repetitive and sometimes easy to get wrong. Data structure traversals fall into this category, particularly in object-oriented languages where traversal code is spread throughout many cooperating modules. In this paper we present a new form of generic programming using traversals that lends itself to a flexible, safe, and efficient generative implementation. We describe the approach, its relation to generic and generative programming, and our implementation and resulting performance.
منابع مشابه
LEESA: Embedding Strategic and XPath-Like Object Structure Traversals in C++
Traversals of heterogeneous object structures are the most common operations in schema-first applications where the three key issues are (1) separation of traversal specifications from type-specific actions, (2) expressiveness and reusability of traversal specifications, and (3) supporting structure-shy traversal specifications that require minimal adaptation in the face of schema evolution. Th...
متن کاملScrap Your Boilerplate—Prologically! PPDP’09 Invited Talk
“Scrap Your Boilerplate” (SYB) is an established style of generic functional programming. The present paper reconstructs SYB within the Prolog language with the help of the univ operator and higher-order logic programming techniques. We pay attention to the particularities of Prolog. For instance, we deal with traversal of non-ground terms. We also develop an alternative model of SYB-like trave...
متن کاملA Strafunski Application Letter Sen Software Engineering a Strafunski Application Letter a Strafunski Application Letter
Strafunski is a Haskell-centred software bundle for implementing language processing components — most notably program analyses and transformations. Typical application areas include program optimisation, refactoring, software metrics, software reand reverse engineering. Strafunski started out as generic programming library complemented by generative tool support to address the concern of gener...
متن کاملA Strafunski Application Letter
Strafunski is a Haskell-centred software bundle for implementing language processing components — most notably program analyses and transformations. Typical application areas include program optimisation, refactoring, software metrics, software reand reverse engineering. Strafunski started out as generic programming library complemented by generative tool support to address the concern of gener...
متن کاملThe Kansas University rewrite engine - A Haskell-Embedded Strategic Programming Language with Custom Closed Universes
When writing transformation systems, a significant amount of engineering effort goes into setting up the infrastructure needed to direct individual transformations to specific targets in the data being transformed. Strategic programming languages provide general-purpose infrastructure for this task, which the author of a transformation system can use for any algebraic data structure. The Kansas...
متن کامل